SELECT
<#assign prefixName=' '>
<#if (select__id??)>
${prefixName} T.ID AS id
	<#assign prefixName=','>
</#if>
<#if (select__endDaTi??)>
${prefixName} T.END_DA_TI AS endDaTi
	<#assign prefixName=','>
</#if>
<#if (select__userId??)>
${prefixName} T.USER_ID AS userId
	<#assign prefixName=','>
</#if>
<#if (select__startingTi??)>
${prefixName} T.STARTING_TI AS startingTi
	<#assign prefixName=','>
</#if>
<#if (select__beginDaTi??)>
${prefixName} T.BEGIN_DA_TI AS beginDaTi
	<#assign prefixName=','>
</#if>
<#if (select__finishTi??)>
${prefixName} T.FINISH_TI AS finishTi
	<#assign prefixName=','>
</#if>
<#if (select__code??)>
${prefixName} T.CODE AS code
	<#assign prefixName=','>
</#if>
<#if (select__password??)>
${prefixName} T.PASSWORD AS password
	<#assign prefixName=','>
</#if>
<#if prefixName == ' '>
  T.ID AS id
, T.END_DA_TI AS endDaTi
, T.USER_ID AS userId
, T.STARTING_TI AS startingTi
, T.BEGIN_DA_TI AS beginDaTi
, T.FINISH_TI AS finishTi
, T.CODE AS code
, T.PASSWORD AS password
</#if>
FROM FD_USER_LO_IN T
<#include "whereUserLoInBy1.ftl">
<#assign prefixName='ORDER BY'>
<#if (order__by__id??)>
${prefixName} T.ID ${order__by__id__value!}
	<#assign prefixName=','>
</#if>
<#if (order__by__endDaTi??)>
${prefixName} T.END_DA_TI ${order__by__endDaTi__value!}
	<#assign prefixName=','>
</#if>
<#if (order__by__userId??)>
${prefixName} T.USER_ID ${order__by__userId__value!}
	<#assign prefixName=','>
</#if>
<#if (order__by__startingTi??)>
${prefixName} T.STARTING_TI ${order__by__startingTi__value!}
	<#assign prefixName=','>
</#if>
<#if (order__by__beginDaTi??)>
${prefixName} T.BEGIN_DA_TI ${order__by__beginDaTi__value!}
	<#assign prefixName=','>
</#if>
<#if (order__by__finishTi??)>
${prefixName} T.FINISH_TI ${order__by__finishTi__value!}
	<#assign prefixName=','>
</#if>
<#if (order__by__code??)>
${prefixName} T.CODE ${order__by__code__value!}
	<#assign prefixName=','>
</#if>
<#if (order__by__password??)>
${prefixName} T.PASSWORD ${order__by__password__value!}
	<#assign prefixName=','>
</#if>
